
const directives = []
const files = require.context('./', false, /.js$/)
files.keys().forEach((key) => {
  const name = key.replace(/\.\/((\d|\D)+)\.js/g, '$1')
  if (name !== 'index') {
    directives.push({
      name,
      value: files(key)?.default
    })
  }
})
export default {
  install (Vue) {
    directives.forEach((item) => {
      Vue.directive(item.name, item.value)
    })
  }
}
